package com.abocode.aichat.app.utils;

import org.springframework.core.io.support.PropertiesLoaderUtils;

import java.util.Properties;

/***
 * Created by guanxf on 2015/12/16.
 */
public class ConfigUtils {

	private ConfigUtils() {
	}

	private static Properties props = null;

	static {
		try {
			props = PropertiesLoaderUtils.loadAllProperties("application.properties");
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

	public static String get(String key) {
		return props.getProperty(key);
	}

	public static String get(String key, String defaultValue) {
		return props.getProperty(key, defaultValue);
	}

}
